package cn.imfc.jat.controller;


import cn.imfc.jat.car.service.MemberServiceCar;
import cn.imfc.jat.test.service.MemberServiceTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("jtaAction")
public class JtaController {

    @Autowired
    private MemberServiceTest memberServiceTest;

    @RequestMapping("insertTest1")
    public String insertTest1(String name,Integer age){
        try {
            String a= memberServiceTest.addUser(name,age);
            return a+"条记录添加成功，数据源一";
        }catch (Exception e){
            e.printStackTrace();
            return "error";
        }

    }

}
